Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active August 31, 2026 04:40
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@DoubleGremlin181
DoubleGremlin181 / Common LeetCode Patterns.MD
Last active August 31, 2026 04:37
Coding Interview — Common LeetCode Patterns Cheat Sheet

Coding Interview — Common LeetCode Patterns Cheat Sheet

All 17 core coding interview patterns. Sorted by commonality × difficulty — most frequent and easiest patterns first, rarest and hardest at the bottom. For each: how to spot it, the core idea, a clean code example, and LeetCode practice problems.


1. Two Pointers

Frequency: ★★★★★ | Difficulty: Easy

@assarbad
assarbad / autossh-with-systemd-hardening-usage.md
Last active August 31, 2026 04:22
Strictly hardened autossh systemd unit template for port-forwarding

How to "install" the enclosed unit template (all require superuser permissions)

  1. place the autossh@.service file in /etc/systemd/system
  2. enable an instance -- suppose your remote host is called frodo then you might run: systemctl enable autossh@frodo (do not use --now here!); IPv4 addresses also worked for me
  3. now it is time to create an override specific to the instance, e.g. : systemctl edit autossh@frodo.service and adjust the following bunch of settings (commented out in the main unit template) like so:
    [Service]
    Environment=REMOTE_PORT=1022
    Environment=TARGET_USER=username
    Environment=TARGET_HOST=frodo.example.com
    
@xen0n
xen0n / check-new-world.tiny.s
Last active August 31, 2026 04:19
Tiny helper checking for LoongArch new world UAPI
# SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#
# how to build this:
#
# $ as -o check-new-world.tiny.o check-new-world.tiny.s
# $ ld check-new-world.tiny.o -o check-new-world.tiny.tmp
# $ objcopy -O binary --only-section=.blob ./check-new-world.tiny.tmp ./check-new-world.tiny
.section ".blob", "aw", @progbits
@denilsonsa
denilsonsa / List of alternative launchers for Android TV.md
Last active August 31, 2026 04:17
List of alternative launchers for Android TV

This was originally shared on reddit, but for some reason I cannot update it anymore. I've now mirrored it as this GitHub Gist.

List of alternative launchers for Android TV

For whatever reason, it's really difficult to discover alternative launchers for Android TV. Sure, you can find a couple of them, but there are so many terrible results that you will end up wasting quite some time.

Thus, I've compiled this list of alternative Android TV launchers. It's not comprehensive (I'm certain I missed some, please suggest them in comments); I'm not endorsing any particular one; and I have not tried all of them. Some are free, some are paid. Some contain ads. Some contain IAP (in-app purchases). Some require too many intrusive permissions.


@danidiaz
danidiaz / netrw.txt
Created October 7, 2016 20:57
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@SahandMalaei
SahandMalaei / typewriter.css
Created August 29, 2026 11:53
Obsidian E-Ink CSS Snippet
/* =========================================================
OBSIDIAN E-INK THEME
========================================================= */
/* ---------------------------------------------------------
CORE COLORS
--------------------------------------------------------- */
body {